package com.derbysoft.ota.application.util;

import javax.annotation.Nullable;

import com.derbysoft.modules.eip.translator.Translator;
import com.google.common.base.Function;

public abstract class Functions {

	public static <F, T> Function<F, T> of(final Translator<F, T> tranlator) {
		return new Function<F, T>() {
			public T apply(@Nullable F from) {
				return tranlator.translate(from);
			}
		};
	}

}
